Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mmu crc #1009

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix mmu crc #1009

wants to merge 2 commits into from

Conversation

3d-gussner
Copy link
Contributor

User reported an issue with Prusa-Firmware 3.14.1 + MMU 3.0.3, PrusaLink 0.8.1 and PrusaConnect see prusa3d/Prusa-Firmware#4818

After troubleshooting I have found that the MMU 3.0.3 crc value is only one char long instead of being two chars. PrusaLink REGEX expected to have exactly two chars for the crc and so failed to get the correct MMU version including the build number. This causes PrusaLink and PrusaConnect to show the printer as "BUSY" and so not usable with PrusaLink and PrusaConnect.

Prusa-Firmware 3.14.0 with MMU 3.0.2 works fine as the MMU crc is two chars.

This fix accepts one AND two char crc which are 0-9 and a-f.

Changing the Prusa-Firmware and MMU3 firmware isn't a real option as this would also cause the need to change the Prusa-Firmware-Buddy and maybe other 3rd party solutions.

Test:
Before PR:

  1. Flash FW 3.14.1 and MMU 3.0.3 firmware
  2. Enable MMU
  3. Restart the printer
  4. Start PrusaLink 0.8.1
  5. Open PrusaLink and PrusaConnect
    a. Both show BUSY state and the printer is "locked"
  6. As a workaround you can disable temporary the MMU in the printer menu, but that also doesn't work always. And after a reboot or new startup the issue is back.

After PR:

  1. Flash FW 3.14.1 and MMU 3.0.3 firmware
  2. Enable MMU
  3. Restart the printer
  4. Start PrusaLink 0.8.2
  5. Open PrusaLink and PrusaConnect
    a. both show IDLE

Also the log files of 0.8.1 in combination of FW 3.14.1+MMU3 shows ERROR: Gather of mmu_version has failed

Copy link

@Nailig Nailig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on an mk3s+ fw 3.14.1-revo with mmu3 fw 3.0.3 by manually editing the files on the RPI zero 2w. This solves the "BUSY" problem in my case.

@3d-gussner
Copy link
Contributor Author

Here how you can manually solve the issue, until the release.

Search for the file regular_expressions.py, the other file __init__.py is less important.
See also https://github.com/prusa3d/Prusa-Link/pull/1009/files.

The path to the file may be different, depending on the Python version.

I personally do not own a RPi, but have PrusaLink running on my PC with Ubuntu.

I can find this file in
~/.local/lib/python3.10/site-packages/prusa/link/printer_adapter/structures
or /home/<my user account/.local/lib/python3.10/site-packages/prusa/link/printer_adapter/structure

but also in ~/.local/lib/python3.9/site-packages/prusa/link/printer_adapter/structures PL has been installed with this Python version.

Search and replace in regluar_expressions.py

\*..\.$”

with

\*[0-9a-f]{1,2}\.$”

again see my PR for the needed changes.

There should be 6 lines that need to be changed.

I also tested if PrusaLink and PrusaConnect work with the customized 0.8.2 version in `init.py.

Hope that helps.

Advantage of the manual change is that you don't lose your configuration you already have.

In case you have ssh enabled on the RPi then you can connect to it and change it there.
As I don't own any RPis you may need to search if you can edit these files on the SD card directly.

@mgtmadness141879
Copy link

Email sent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants